/* Copyright (c) 2004-2024 peigen.info. All rights reserved. */

package info.peigen.hotpot.common.service.base.processor.pre;


import cn.hutool.core.util.ObjectUtil;
import info.peigen.hotpot.common.service.base.processor.Processor;
import info.peigen.hotpot.common.service.base.processor.ProcessorServiceContext;
import org.noear.solon.annotation.Component;

/**
 * <b>(CheckOrderProcessor)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2022/5/26
 */
@SuppressWarnings("rawtypes")
@Component
public class CheckOrderProcessor implements Processor {
    @Override
    public Integer level() {
        return 2;
    }

    @Override
    public void execute(ProcessorServiceContext serviceContext) {
        if (ObjectUtil.isNotNull(serviceContext.getOrder())) {
            serviceContext.getOrder().check();
        }
    }
}
